#pragma once

#include<BWAPI.h>

using namespace BWAPI;

class ControlerBass
{
public:
	void OnFrame()
	{
		PrintInfomation();

		if(_target != NULL)
		{
			if(_target->getHitPoints() <= 0)
			{
				_state = Idle;
			}
			switch(_state)
			{
			case Idle:
				_state = ChaseAttack;
				break;
			case ChaseAttack:
				ChaseAttackFunction();
				break;
			case WaitForCheck:
				WaitForCheckFunction();
				break;
			case WaitAttackFrame:
				WaitAttackFrameFunction();
				break;
			case ChaseDontAttack:
				ChaseDontAttackFunction();
				break;
			}
		}
	}
	void DoAttackChase(Unit* target)
	{
		_target = target;
	}
	bool CanAttack() const
	{
		return 
	}
	bool CanMove() const
	{
	}
protected:
	enum Mode{Manual , ChaseAttack};
	enum State{Idle , ChaseAttack , WaitForCheck , WaitAttackFrame , ChaseDontAttack};
	Unit* _me;
	Unit* _target;
	State _state;
	int _frameToWait;
};